﻿//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//    Crolengi, this program (a part of program) is gameengine based on C++\Directx
//    Copyright (C) 2008 Pashinin Anton Alekseevich (Crol)
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//    (INCLUDING NEGLIGENCE OR OTHERWISE) 
//    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
//    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//    Contacts: 
//    Mail: crolengi@gmail.com
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


#ifndef  MLabel_h
#define  MLabel_h


#include "include\\Utils\\DrawingFunctions.h"
#include "include\\Utils\\defines01.h"
#include "include\\UI\\BaseUI.h"

//#################################################################################################################
///// 
/////   :: РљР›РђРЎРЎ ::
///// 
//#################################################################################################################
class CLREngi_UI_MLabel:public CLREngi_UI_BaseUI {

//#################################################################################################################
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                     РљРћРќРЎРўР РЈРљРўРћР 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public:
CLREngi_UI_MLabel(LPDIRECT3DDEVICE9 *D,char *nm){
   pos_x  = 0;
   pos_y  = 0;
   width  = 5;
   height = 15;
   Device = D;
   g_pVB=NULL;

   //matWorld = matW;

   Font=NULL; 
   selected = false;
   TextColor =D3DCOLOR_XRGB(200,200,240);


   Name = nm;

   allow_shift = false;
   BgColor = D3DCOLOR_XRGB(51,51,51);
   BackColor = D3DCOLOR_XRGB(200,200,200);

   FontName = new LPD3DXFONT();
   D3DXCreateFont( (*Device), 10,5, FW_ULTRABOLD, 0, FALSE, 
		                 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, 
		                 DEFAULT_PITCH | FF_DONTCARE, TEXT("Comic Sans"), 
		                 FontName );


   Font = new LPD3DXFONT();
    D3DXCreateFont( (*Device), 36,12, FW_REGULAR, 0, FALSE, 
		                 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, 
						 DEFAULT_PITCH , TEXT("pandominimum"), 
		                 Font );

   visible = true;
   }

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                       Р”Р•РЎРўР РЈРљРўРћР 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
~CLREngi_UI_MLabel(void)
   {
	   SAFE_RELEASE(g_pVB);
	   SAFE_RELEASE(Font);
	   SAFE_RELEASE(FontName);
   }

};

#endif 

